import React from 'react'
import {withRouter } from 'react-router-dom'
import { Component } from 'react'
import flower from './flower.png'
import './index.css'

class index extends Component {
    confirm2 =()=>{
        this.props.history.push('/cpo')
    }
    render() {
        const {
            items = [],
            confirm = () => {}
        } = this.props
        return (
            <div>
                <div className="cpo-nav"></div>
                <div className="cpo-title2">
                    <button className=" title-field " onClick={this.confirm2} >331-Ours'Studio</button>
                    <div className="select-field disappear">
                        {items.map((item, i) => (
                            <button
                                className="smallbutton"
                                key={i}
                                onClick={confirm.bind(this, i)}
                            >
                                {item}
                                {i===3 && <img className="flower" src={flower} alt="花花" />}
                            </button>
                        ))}
                    </div>
                    <div className='input-field'>
                        <input className="input" type="text" placeholder="搜索关键字" />
                        <button className="input-button">点击搜索</button>
                    </div>
                </div>
            </div>
        )
    }
}
export default withRouter(index)